@color-white: #fff;
@color-yellow: #ffd24d;
@color-organe: #ffa64d;
@color-brown: #8c6900;
@color-success: #d9e67d;
@color-error: #ffb399;
@color-add-remove: #cc9979;
@color-disable: #535362;

@color-bgc-light-gray: #ddd;
@color-bgc-deep-gray: #aaa;
@color-bgc-light-yellow: #ffe699;
@color-bgc-deep-yellow: #ffd24d;
@color-bgc-light-red: #ff2626;
@color-bgc-deep-red: #b20000;
@color-bgc-light-orange: #ff9122;
@color-bgc-deep-orange: #d96d00;
@color-bgc-light-purple: #ac91ff;
@color-bgc-deep-purple: #7a4dff;
@color-bgc-light-green: #80ff00;
@color-bgc-deep-green: #00b200;
@color-bgc-light-blue: #2693ff;
@color-bgc-deep-blue: #006dd9;
@color-bgc-light-brown: #661a00;
@color-bgc-deep-brown: #401000;

@font-size-h1: 2.5rem;
@font-size-h2: 2rem;
@font-size-h3: 1.65rem;
@font-size-h4: 1.4rem;
@font-size-h5: 1.2rem;
@font-size-normal: 1rem;
@font-size-rem: 16px;

@normal-box-border-width: 0.7rem;
@normal-face-border-width: 0.5rem;
@normal-box-text-padding: 0.5rem 1.2rem;
@alert-box-text-padding: 1rem 1.2rem;
@normal-tag-text-padding: 0.2rem 0.5rem;
@normal-btn-size: 2.5rem;
@normal-btn-border: 0.25rem solid @color-brown;

html,
body {
  font-family: 'PingFang SC', STHeiti, 'Microsoft YaHei', SimHei,
    'Helvetica Neue', Arial, sans-serif;
  color: @color-brown;
  font-size: @font-size-normal;
  box-sizing: border-box;
  height: 100%;
  width: 100%;
  max-width: 100%;
  padding: 0;
  & * {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
  }
  a {
    text-decoration: none;
    color: @color-brown;
  }
}

.box {
  position: relative;
  z-index: 9;
  box-sizing: border-box;
  border-radius: 2rem;
  border: @normal-box-border-width solid @color-white;
  text-align: center;
  overflow: hidden;
  &.box-stat {
    border-color: @color-brown;
  }
  .box-text {
    padding: @normal-box-text-padding;
  }
}

.process {
  position: absolute;
  z-index: -1;
  width: 100%;
  height: 100%;
  &.gray {
    background-color: @color-bgc-light-gray;
    .haveWork {
      background-color: @color-bgc-deep-gray;
    }
  }
  &.yellow {
    background-color: @color-bgc-light-yellow;
    .haveWork {
      background-color: @color-bgc-deep-yellow;
    }
  }
  &.red {
    background-color: @color-bgc-light-red;
    .haveWork {
      background-color: @color-bgc-deep-red;
    }
  }
  &.orange {
    background-color: @color-bgc-light-orange;
    .haveWork {
      background-color: @color-bgc-deep-orange;
    }
  }
  &.purple {
    background-color: @color-bgc-light-purple;
    .haveWork {
      background-color: @color-bgc-deep-purple;
    }
  }
  &.green {
    background-color: @color-bgc-light-green;
    .haveWork {
      background-color: @color-bgc-deep-green;
    }
  }
  &.blue {
    background-color: @color-bgc-light-blue;
    .haveWork {
      background-color: @color-bgc-deep-blue;
    }
  }
  &.brown {
    background-color: @color-bgc-light-brown;
    .haveWork {
      background-color: @color-bgc-deep-brown;
    }
  }
  display: flex;
  &.LR {
    flex-direction: row;
    .haveWork {
      height: 100%;
    }
    .half {
      width: 50%;
    }
  }
  &.RL {
    flex-direction: row-reverse;
    .haveWork {
      height: 100%;
    }
    .half {
      width: 50%;
    }
  }
  &.TB {
    flex-direction: column;
    .haveWork {
      width: 100%;
    }
    .half {
      height: 50%;
    }
  }
  &.BT {
    flex-direction: column-reverse;
    .haveWork {
      width: 100%;
    }
    .half {
      height: 50%;
    }
  }
}

.face-box {
  height: 100%;
  width: 100%;
  .face {
    .box();
    height: 100%;
    width: 100%;
    border-width: @normal-face-border-width;
    border-radius: 50%;
    .face-img {
      position: relative;
      width: 100%;
      height: 100%;
      img {
        width: 100%;
        &.hide {
          filter: contrast(0) brightness(0) invert(1);
        }
      }
      .plus {
        position: absolute;
        height: 7%;
        width: 40%;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        margin: auto;
        background-color: @color-brown;
        &:first-of-type {
          transform: rotateZ(0.25turn);
        }
        z-index: 999999;
      }
    }
  }
  .tags {
    position: relative;
    z-index: 9999;
    width: 100%;
    &.tags-bottom {
      bottom: 0;
      transform: translate(0, -1.5 * @normal-face-border-width;);
    }
    &.tags-right {
      top: -100%;
      right: -100%;
      transform: translate(-1.5 * @normal-face-border-width);
      z-index: 9999;
    }
    .tag {
      .box();
      white-space: nowrap;
      .box-text {
        padding: @normal-tag-text-padding;
      }
      border-radius: 5px;
      border-width: 3px;
      width: 100%;
      margin-bottom: 5px;
    }
    .missed {
      text-decoration:line-through;
      color: @color-bgc-light-gray;
      .haveWork {
        background-color: @color-bgc-deep-gray;
      }
      background-color: @color-bgc-deep-gray;
    }
    .having {
      filter: hue-rotate(90deg);
    }
  }
  .btns {
    z-index: 9999;
    position: relative;
    &.btns-TR {
      top: -100%;
      right: 3 * @normal-face-border-width;
      transform: translate(100%);
    }
    &.btns-TL {
      top: -100%;
      right: 100%;
      transform: translate(100%);
    }
    &.btns-BR {
      top: -4 * @normal-face-border-width;
      right: 4 * @normal-face-border-width;
      transform: translate(100%);
    }
    &.btns-BL {
      top: -4 * @normal-face-border-width;
      right: 100%;
      transform: translate(100%);
    }
    .btn {
      width: @normal-btn-size;
      img {
        width: @normal-btn-size;
      }
    }
  }
}

.alert {
  .box();
  width: 80%;
  padding: @alert-box-text-padding;
  position: fixed;
  z-index: 99999999;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  &.success {
    background-color: @color-success;
  }
  &.error {
    background-color: @color-error;
  }
}

.msgBox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999999;
  background-color: #0009;
  .msgBoxContent {
    .box();
    background-color: @color-yellow;
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    display: flex;
    flex-direction: column;
    padding: @normal-box-text-padding;
    .title {
      font-size: @font-size-h2;
    }
    .msg {
      text-align: left;
    }
    .btns {
      display: flex;
      justify-content: space-between;
    }
  }
}

.btn {
  .box();
  border: @normal-btn-border;
}

.btn-disable {
  filter: brightness(0.8) contrast(0.7);
}

.menuBox {
  .msgBox();
  background-color: #0009;
  .menuBoxContent {
    .msgBoxContent();
    justify-content: flex-start;
    overflow: visible;
    .customer {
      position: relative;
      width: 25vw;
      margin-top: calc(-10vw - 3rem);
    }
    .note-cost {
      margin-top: 0vw;
      text-align: right;
    }
    .box {
      display: flex;
      margin: 1.5rem 0;
      flex-direction: column;
      gap: 0.5rem;
      border-color: @color-brown;
      border-width: @normal-face-border-width;
      text-align: left;
      padding: 0.5rem;
      border-radius: 0;
      .row {
        white-space: nowrap;
        display: flex;
        align-content: center;
        vertical-align: center;
        margin: 0.5 * @font-size-normal;
        input {
          width: 8%;
        }
        label {
          min-width: 35%;
          flex-shrink: 0;
        }
        .dots {
          height: 0;
          padding-top: 0.5rem;
          width: 40%;
          flex-shrink: 1;
          border-bottom: 0.5 * @normal-face-border-width dotted;
        }
        .dish-cost {
          width: 17%;
          text-align: right;
        }
      }
    }
  }
  .btns {
    display: flex;
    justify-content: space-between;
  }
}